Fixes #4963, #5064. FileDialog nav fixes & TableView redesign - #5062
Merged
Conversation
Fixes text input controls to ignore Alt/Ctrl-modified keys, even with AssociatedText (Kitty protocol). Updates FileDialog TableView height. Adds regression tests for input handling and hotkey routing. Documents FileDialog keyboard/nav issues. Refactors KeyboardEventTests for clarity.
Improve FileDialog navigation and TableView key handling - Reset TableView viewport X and Y to 0 on navigation for consistent top-left alignment in FileDialog. - Enable TabStop on _tableViewContainer for better keyboard accessibility. - Adjust _tableView height and anchor _tbFind Y position for improved layout robustness. - Refactor TableView key handling: ignore control/modified keys, handle navigation only when focused and rows exist, and return true when a key is handled.
9 tasks
Replaces OnActivated with OnActivating, updating the method to return a bool based on ToggleCurrentCellSelection. This supports cancellable or conditional activation in line with new event handling conventions.
This was referenced Apr 23, 2026
Refactor TableView to v2 command/event architecture - Implements IValue<Point?> and standard ValueChanged events - Replaces OnMouseEvent with MouseBindings for all mouse actions - Aligns Command.Accept/Activate/Toggle semantics to v2 standards - Adds DefaultKeyBindings (Emacs, Home/End, Space, etc.) - Uses C# 14 semi-auto properties for selection, default -1 - Moves collection-navigator logic to OnKeyDownNotHandled - Threads ICommandContext through selection/navigation methods - Marks legacy events/types as [Obsolete] with shims for compat - Updates FileDialog and DatePicker to new TableView API - Adds/updates tests and documents changes in tableview-refactor-summary.md - Cleans up code style and removes dead code throughout
Comprehensive tests for TableView navigation, selection, events, and edge cases. Ensures current behavior is preserved ahead of planned redesign.
Refactored TableView to use TableSelection/TableSelectionRegion for richer selection state, replacing Point-based selection. Renamed EnsureSelectedCellIsVisible to EnsureCursorIsVisible and updated all references. Changed Command.Toggle to Command.ToggleExtend for extended selection. Improved null handling for Table and selection state, preventing NullReferenceExceptions. Updated tests and documentation to match the new model. Made minor code style and naming improvements.
Replaced all usages of SelectedRow/SelectedColumn with the new Value property and its Cursor.X/Y members for improved selection state management and null-safety. Updated event handlers to use ValueChanged instead of SelectedCellChanged, and replaced direct selection assignments with SetSelection calls. Modernized UI control initialization, streamlined menu/status bar construction, and improved code style and null handling throughout. Marked SelectedCellChanged as obsolete and updated tests and scenarios to use the new selection APIs.
No code modifications were present in the provided diff. No commit necessary.
Renamed the TableView event and event args from SelectedCellChanged/SelectedCellChangedEventArgs to CursorChanged/CursorChangedEventArgs. Updated all references, event invocations, and tests accordingly. Improved comments to clarify the event tracks cursor position changes, not cell selection.
Major overhaul of TableView selection and event model: - Remove obsolete events (CellActivated, CellToggled, CursorChanged) and related args. - All selection state now managed via Value (TableSelection). - Internal selection fields are private; use SetSelection/Value APIs. - Update all code/tests to use Value.Cursor and ValueChanged. - Accept/Accepted replaces CellActivated; ToggleExtend handled directly. - Deep-copy multi-selection regions for immutability. - Refactor navigation, selection, and rendering to new model. - Update all scenarios and tests for new APIs. - Modernize code style and remove redundant code.
Improved and expanded XML documentation and in-code comments for TableView and related sources, fixing typos and grammar for accuracy and consistency. Major updates to tableview.md add a detailed table of contents, expanded sections, code examples, and event usage. Minor code fixes and improved parameter tags enhance maintainability and developer experience.
Refactored TableView.Selection.cs to move IValue<TableSelection?> implementation to the end of the file and organize related properties. Changed TableSelectionRegion to use init-only properties for immutability. Updated selection region logic to use immutable instances, improved region clamping, and fixed minor logic issues. Enhanced code style and maintainability without altering selection behavior.
Refactor TableView internals and API to use "cursor" instead of "selected"/"selection" for navigation state. Update all related fields, methods, comments, and tests for clarity and consistency. No functional changes; improves code readability and aligns with TableSelection.Cursor semantics.
Reorganize TableView by moving content-related properties and methods (content size, scrolling, viewport management) into TableView.Content.cs. This structural refactor improves code organization, separation of concerns, and maintainability. No functional changes introduced.
Comprehensive TableView API overhaul for v2.0.0: unified selection types, IValue<TableSelection?> support, navigation API terminology shift from "Selection" to "Cursor", and legacy API deprecation. Fixes keyboard selection toggling and region calculation bugs. Extracts content/viewport logic to a partial class and updates XML/docs. Ctrl+Click toggle regression noted for follow-up.
…minal.Gui into Issue-4963-filedialog
Member
Author
|
I'm currently working on two last issues:
|
tig
requested review from
YourRobotOverlord and
Copilot
and removed request for
Copilot
April 24, 2026 21:57
FileDialog TreeView feature is now disabled via `#if !FILEDIALOG_ENABLE_TREE`, hiding all related UI and logic. TreeView initialization and toggle button are only present when the feature is off. `FileDialogStyle` now supports a nullable file system and defaults `DefaultUseColors` to true. FileDialog-related config settings are removed. `TableView.TruncateOrPad` now truncates by grapheme cluster, preventing surrogate pair corruption. Adds a test to ensure truncation does not throw or produce invalid surrogates with emoji.
…i into Issue-4963-filedialog
Removes FILEDIALOG_ENABLE_TREE conditional blocks, making the directory tree, toggle button, and related styles always active in FileDialog. Updates FileDialogStyle and tests to support the unified implementation. FileDialogExamples now sets PreserveFilenameOnDirectoryChanges via checkbox. Tree functionality is now a standard, always-on part of the dialog UI.
- Add ".lnk" color mapping to FileSystemColorProvider - Refine FileDialog pane border and alignment - Reorder _treeView initialization for clarity - Simplify TableView style for a cleaner appearance - Use theme-based colors in TableView for consistency - Ensure column color getter and style order are correct - Set AllowsMultipleSelection to false in FileDialog - Refactor ColumnStyle.Visible to use auto-property and MaxWidth logic
Collaborator
|
File dialog in designer is now putting CPU to 100% just clicking around in TableView. This happens in all 3 of these versions: 2.0.0-rc.5 |
This was referenced Apr 30, 2026
This was referenced May 11, 2026
This was referenced May 21, 2026
This was referenced May 28, 2026
This was referenced Jun 15, 2026
This was referenced Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FileDialogkeyboard nav is broken #4963 (FileDialog keyboard nav issues)TableViewneeds re-factoring before v2.0.0 can be released - BREAKING CHANGES #5064 (TableView API redesign)Dialognav is broken - Once nav cycles through once, Tab/Shift-Tab skip Cancel etc... #5066FileDialog Fixes
TableView Redesign (Breaking Changes)
Type consolidation & IValue support:
Terminology — \Selection\ → \Cursor\ for navigation APIs:
Return type cleanup:
Partial class extraction:
Bug fixes:
XML docs & documentation:
Known Issue
Remaining (future PR)